//
//  MCFilterCollectionViewCell.m
//  TLYL
//
//  Created by miaocai on 2017/6/7.
//  Copyright © 2017年 TLYL01. All rights reserved.
//

#import "MCFilterCollectionViewCell.h"
#import "UIImage+Extension.h"

@interface MCFilterCollectionViewCell()



@end
@implementation MCfilterBallModel
@end

@implementation MCFilterCollectionViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.backgroundColor = [UIColor clearColor];
    [self.iconBtn setTitleColor:RGB(37, 133, 203) forState:UIControlStateNormal];
    //    [self.iconBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateSelected];
    [self.iconBtn.layer setCornerRadius:5.0]; //设置矩形圆角半径
    [self.iconBtn.layer setBorderWidth:1.0]; //边框宽度
    CGColorRef colorref = RGB(37, 133, 203).CGColor;
    [self.iconBtn.layer setBorderColor:colorref];//边框颜色
    self.iconBtn.userInteractionEnabled = NO;
    
    [self.iconBtn setBackgroundImage:[UIImage createImageWithColor:[UIColor clearColor]] forState:UIControlStateNormal];
    
    //    UIImage *selectedImg = [UIImage createImageWithColor:MC_BALLSELECRED_COLOR];
    //    [self.iconBtn setBackgroundImage:[selectedImg drawRectWithRoundedCorner:self.widht * 0.5 size:self.bounds.size] forState:UIControlStateSelected];
    //    UIImage *normalImg = [UIImage createImageWithColor:[UIColor clearColor]];
    //    [self.iconBtn setBackgroundImage:[normalImg drawRectWithRoundedCorner:self.widht size:self.bounds.size] forState:UIControlStateNormal];
    
}

- (void)setDataSource:(MCfilterBallModel *)dataSource{
    _dataSource = dataSource;
    [self.iconBtn setTitle:self.dataSource.info forState:UIControlStateNormal];
    [self.iconBtn setTitleColor:RGB(37, 133, 203)  forState:UIControlStateNormal];
}



- (void)setSelected:(BOOL)selected{
    
    [super setSelected:selected];
    self.iconBtn.selected = selected;
    self.dataSource.selected = selected;
}

- (void)dealloc{
    
    NSLog(@"MCFilterCollectionViewCell----dealloc");
}
@end
